package Shopping;

public class Shopping {
    private String name;
    private int  price;
    private int  num;

    public Shopping() {
    }

    public Shopping(String name, int price, int num) {
        this.name = name;
        this.price = price;
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void list(){
            System.out.println("商品；"+getName());
            System.out.println("价格"+getPrice());
            System.out.println("数量"+getNum());
    }


    public void listCars(){
        System.out.println("商品；"+getName());
        System.out.println("价格"+getPrice());
        System.out.println("数量"+getNum());
    }

    public void deleat(){

    }

    public void result(){

    }

}
